package com.android.b.c;

import android.app.Activity;
import android.view.Gravity;
import android.widget.FrameLayout;
import android.widget.FrameLayout.LayoutParams;

import com.adwo.adsdk.AdwoAdView;

public class GameTools {

	// -------------------------------------------------------------------------------------------------------------------
	public static void as(Activity activity, int gravity) {
		String Adwo_PID = "c96089e549e5482faf2d4a0f0562dced";
		AdwoAdView adView = new AdwoAdView(activity, Adwo_PID, true, 30);
		FrameLayout.LayoutParams params = getParams(gravity);
		activity.addContentView(adView, params);
	}
	
	// -------------------------------------------------------------------------------------------------------------------
	private static LayoutParams getParams(int gravity) {
		FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(
				FrameLayout.LayoutParams.WRAP_CONTENT,
				FrameLayout.LayoutParams.WRAP_CONTENT);

		params.gravity = gravity|Gravity.CENTER_HORIZONTAL ;
		return params;
	}

}
